import * as React from 'react';
import { Route, RouteComponentProps, Switch } from 'react-router-dom';
import styles from './style.less';
import Top from './Top';
import Bottom from './Bottom';
import { Redirect } from 'umi';
import BossList from '@/pages/boss/center/BossList';
import BossInfo from '@/pages/boss/center/BossInfo';
import BossResult from '@/pages/boss/center/BossResult';

interface IProps extends RouteComponentProps {
  isLogin: boolean;
}

class Layouts extends React.PureComponent<IProps> {
  public render() {
    return (
      <div className={styles.boss}>
        <Top />
        <Switch>
          <Route path="/boss/list" component={BossList} />
          <Route path="/boss/info" component={BossInfo} />
          <Route path="/boss/result" component={BossResult} />
          <Redirect to="/boss/list" />
        </Switch>
        <Bottom />
      </div>
    );
  }
}

export default Layouts;
